//
//  ViewController.m
//  LZQRCode
//
//  Created by apple on 16/4/20.
//  Copyright © 2016年 m14a.cn. All rights reserved.
//

#import "ViewController.h"
#import "LZQRCodeTool.h"

@interface ViewController ()

@property (weak, nonatomic) IBOutlet UITextView *tv;

@property (weak, nonatomic) IBOutlet UIImageView *qrImageView;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
}

- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
    // 只传字符串
    UIImage *image = [LZQRCodeTool createQRCodeWithString:self.tv.text];
    // 4. x显示图片
    self.qrImageView.image = image;
}

@end
